// header
function search(){
    location.href="搜索页"
}
function city(){
    location.href="城市页"
}
// article
function DataQuick(){
    location.href="快速资讯"
}
function litigation(){
    location.href="打官司"
}
//figure
function matrimony(){
    location.href="家庭婚姻"
}
function injury(){
    location.href="劳动工伤"
}
function borrowMoney(){
    location.href="借款借贷"
}
function trafficCrash(){
    location.href="交通事故"
}
function contractDispute(){
    location.href="合同纠纷"
}
function houseProperty(){
    location.href="房产纠纷"
}
function criminalDefense(){
    location.href="刑事辩护"
}
function allCategories(){
    location.href="全部分类"
}
// main


let ul=document.querySelector("main ul")
console.log(ul);
let  html=""
let url="http://jx.xuzhixiang.top/ap/api/productlist.php"
let params={uid:"66545"}
axios.get(url,{params}).then((res)=>{
    
    let pobj=res.data.data
    console.log(pobj);
    pobj.forEach(obj => {
      html+=`
      <li onclick="particular(${obj.pid})">
        <img src="${obj.pimg}" alt="" />
        <div class="mask">${obj.pname}</div>
        <div class="js">
          <p class="p1">擅长：${obj.pdesc}</p>
          <p class="p2">
            <span class="sp2">￥${obj.pprice}</span><span class="sp1">${obj.pid}咨询</span>
          </p>
        </div>
      </li>
      `
    });
    ul.innerHTML=html
})
function particular(pid){
    location.href=`../律师馆/lawyerprofile.html?pid=${pid}`
    localStorage.setItem("pid",pid)
}


//footer
function theInnsOfCourt(){
    location.href="律师馆"
}
function news(){
    location.href="消息"
}
function volunteer(){
    location.href="志愿者"
}
function me(){
    location.href="我的"
}
